//
//  CUUserManager.m
//  Council
//
//  Created by Demon on 2018/3/24.
//  Copyright © 2018年 Demon. All rights reserved.
//

#import "CUUserManager.h"

@implementation CUUserManager

NSString * const kUserLoginStatus = @"kUserLoginStatus";
NSString * const kUserTelPhone = @"kUserTelPhone";

void set_userdefault(NSString *key, id value) {
    [[NSUserDefaults standardUserDefaults] setValue:value forKey:key];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

id get_userdefault(NSString *key) {
    id value = [[NSUserDefaults standardUserDefaults] valueForKey:key];
    return value;
}

BOOL login_status(void) {
    BOOL status = [[NSUserDefaults standardUserDefaults] boolForKey:kUserLoginStatus];
    return status;
}

void set_login_status(BOOL status) {
    [[NSUserDefaults standardUserDefaults] setBool:status forKey:kUserLoginStatus];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

@end
